#!/usr/bin/perl -w

# ======================================================================
#
# Copyright (C) ADN
# Sonde.pl
# Description:
#  - Lanceur de la sonde
#  - Launcher of the Sonde
#
# ======================================================================

use strict;
use ADN::CONF::Read;

my ( $path, $conf, $i );
my %service;
$conf = ADN::CONF::Read->new();
$path = $conf->_send_path();
%service = $conf->service();

if ( @ARGV ) {
	if ( $ARGV[0] eq "-h" || $ARGV[0] eq "--help" || $ARGV[0] eq "/?" ) {
		print "Help : perldoc $0" . "\n";
		exit 0;
	}
}

if ( $^O eq "MSWin32" ) {
	if ( $service{"display"} == 1 ) {
       	system ( "perl.exe $path/SERVER/Server.pl");
    }
	if ( $service{"display"} == 0 ) {
		system ( "net start adnsonde" );
	}
}
else {
	system ( "perl $path/SERVER/Server.pl" );
}	
1;
__END__

=pod

=head1 NAME

Sonde.pl - Perl program to launch the Sonde module part of the AD-Network Project

=head1 SYNOPSIS

./Sonde.pl

That's it.

=head1 DESCRIPTION

Sonde.pl will launch the ADN::SERVER::Server modular of the AD-Network TEAM. It's a 
standalone SOAP server to work with WCF Technologie. 

This Sonde help you to launch script on the Network based in the module :
ADN::SERVER::LIBRARY And send back the result to the client.

=head2 CONFIGURATION

All the configuration are in the file : B<conf.xml> in the module : ADN

=head3 HELP

to help you configure the Sonde module you can refer to the 
ADN::SERVER::HELP::Conf.pl Perl Program

=head1 AUTHOR

ADN TEAM, E<lt>support@ad-network.euE<gt>

=head1 BUG REPORT

Use TRAC system to report bug or ask for features:
L<http://ad-network.eu/trac/newticket>

=head1 DOWNLOAD

ADN SOnde is available at
L<http://ad-network.eu/web/index.php/produit.html?art=dl>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2009 by ADN TEAM, E<lt>support@ad-network.euE<gt>

This software is under the LGPL
L<http://www.gnu.org/licenses/lgpl-3.0.txt>
L<http://www.gnu.org/licenses/lgpl.html>

=cut
